﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerController : MonoBehaviour {
    private BaseController baseController;
	// Use this for initialization
	void Start () {
        baseController = GetComponent<BaseController>();

    }
	
	// Update is called once per frame
	void FixedUpdate () {
        TestInput();
	}

    private void TestInput()
    {
        if (Input.GetKeyDown(KeyCode.W) || Input.GetKeyDown(KeyCode.Space))
        {
            baseController.Jump();
        }
        if(Input.GetKey(KeyCode.A))
        {
            baseController.TurnLeft();
        }
        if (Input.GetKey(KeyCode.D))
        {
            baseController.TurnRight();
        }
        if (Input.GetKeyDown(KeyCode.S))
        {
            baseController.Slide();
        }
        if (Input.GetKey(KeyCode.Z))
        {
            baseController.Decelerate();
        }

    }
}
